package com.csdj.server.controller;


import com.csdj.server.pojo.Nation;
import com.csdj.server.service.INationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ZouLi
 * @since 2022-12-12
 */
@RestController
@RequestMapping("/employee/basic/nation")
@Api(tags = "民族控制器")
public class NationController {
    /**
     * 注入nationService
     **/
    @Autowired
    private INationService nationServiceImpl;

    @ApiOperation(value = "获取所有民族")
    @GetMapping("/getAllNation")
    public List<Nation> getAllNation(){
        return nationServiceImpl.list();
    }
}
